package com.itheima.health.controller;


import com.itheima.health.common.R;
import com.itheima.health.pojo.vo.BusinessReportVO;
import com.itheima.health.pojo.vo.ReportMemberVO;
import com.itheima.health.service.ITMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author cpanda
 * @since 2024-01-30
 */
@RestController
public class TMemberController {
    @Autowired
    ITMemberService memberService;

    /**
     * 会员数量统计
     *
     * @return
     */
    @GetMapping("/report/getMemberReport")
    public R getMemberReport() {
        ReportMemberVO vo = memberService.getMemberReport();
        return R.success(vo);
    }

    /**
     * 运营数据统计
     */
    @GetMapping("/report/getBusinessReportData")
    public R BusinessReportData() {
        BusinessReportVO vo = memberService.BusinessReportData();
        return R.success(vo);
    }

}
